<template>
  <div class="spinner">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
  </div>
</template>

<script>
import { reactive, toRefs, onBeforeMount, onMounted } from 'vue';
export default {
  name: '',
  setup() {
    const data = reactive({});
    onBeforeMount(() => {});
    onMounted(() => {});
    return {
      ...toRefs(data)
    };
  }
};
</script>
<style scoped lang="less">
.spinner {
  width: 20px;
  height: 20px;
  animation: spinner-y0fdc1 7s infinite ease;
  transform-style: preserve-3d;
}

.spinner > div {
  background-color: rgba(0, 17, 255, 0.39);
  height: 100%;
  position: absolute;
  width: 100%;
  border: 1px solid #1100ff;
}

.spinner div:nth-of-type(1) {
  transform: translateZ(-10px) rotateY(180deg);
}

.spinner div:nth-of-type(2) {
  transform: rotateY(-270deg) translateX(50%);
  transform-origin: top right;
}

.spinner div:nth-of-type(3) {
  transform: rotateY(270deg) translateX(-50%);
  transform-origin: center left;
}

.spinner div:nth-of-type(4) {
  transform: rotateX(90deg) translateY(-50%);
  transform-origin: top center;
}

.spinner div:nth-of-type(5) {
  transform: rotateX(-90deg) translateY(50%);
  transform-origin: bottom center;
}

.spinner div:nth-of-type(6) {
  transform: translateZ(10px);
}

@keyframes spinner-y0fdc1 {
  0% {
    transform: rotate(45deg) rotateX(-25deg) rotateY(25deg);
  }

  50% {
    transform: rotate(45deg) rotateX(-385deg) rotateY(25deg);
  }

  100% {
    transform: rotate(45deg) rotateX(-385deg) rotateY(385deg);
  }
}
</style>
